/*
package cn.simon.config;

import com.rabbitmq.client.AMQP;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.HeadersExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.handler.annotation.Header;

import java.util.HashMap;
import java.util.Map;

*/
/**
 * @功能描述： rabbitMq配置类-头部信息
 * @Auther: simon-yi'an
 *//*

@Configuration
public class RabbitMqHeaderConfig {
    private static final String QUEUE01 = "queue_header01";
    private static final String QUEUE02 = "queue_header02";
    private static final String HEADEREXCHANGE = "headerExchange";

    @Bean
    public Queue queue_header01(){
        return new Queue(QUEUE01);
    }
    @Bean
    public Queue queue_header02(){
        return new Queue(QUEUE02);
    }
    @Bean
    public HeadersExchange headersExchange(){
        return new HeadersExchange(HEADEREXCHANGE);
    }

    @Bean
    public Binding bindHeadExchange01(){
        Map<String,Object> map = new HashMap<>();
        map.put("color","red");
        map.put("size","15px");
        return BindingBuilder.bind(queue_header01()).to(headersExchange()).whereAll(map).match();
    }

    @Bean
    public Binding bindHeadExchange02(){
        Map<String,Object> map = new HashMap<>();
        map.put("color","red");
        map.put("size","10px");
        return BindingBuilder.bind(queue_header02()).to(headersExchange()).whereAny(map).match();
    }
}*/
